module.exports = {
  'POST /update-time': (req, res) => {
    setTimeout(() => {
      res.json({
        success: true,
        message: '时间更新成功',
        time: req.body.time
      });
    }, 500);
  },

  'POST /start-game': (req, res) => {
    setTimeout(() => {
      res.json({
        success: true,
        message: '游戏开始成功',
        gameId: 'game_' + Date.now()
      });
    }, 500);
  },

  'GET /players': (req, res) => {
    setTimeout(() => {
      res.json({
        success: true,
        gameStatus: 'waiting', // waiting | playing | ended
        currentTerrain: '草原',
        players: [
          {
            id: 'player1',
            name: '玩家A',
            avatar: '/static/avatar1.png',
            status: '已准备',
            marbles: 5, // 弹珠数量(2-10)
            score: 120,
            marbleSkin: '火球',
            achievements: ['新手', '连胜3局'],
            isHost: true
          },
          {
            id: 'player2', 
            name: '玩家B',
            avatar: '/static/avatar2.png',
            status: '准备中',
            marbles: 3, // 弹珠数量(2-10)
            score: 80,
            marbleSkin: '冰球',
            achievements: ['新手'],
            isHost: false
          },
          {
            id: 'player3',
            name: '玩家C',
            avatar: '/static/avatar3.png',
            status: '未准备',
            marbles: 4, // 弹珠数量(2-10)
            score: 95,
            marbleSkin: '彩球',
            achievements: [],
            isHost: false  
          },
          {
            id: 'player4',
            name: '玩家D',
            avatar: '/static/avatar4.png',
            status: '已准备',
            marbles: 6, // 弹珠数量(2-10)
            score: 150,
            marbleSkin: '火焰',
            achievements: ['高手', '连胜5局'],
            isHost: false
          },
          {
            id: 'player5',
            name: '玩家E',
            avatar: '/static/avatar5.png',
            status: '已准备',
            marbles: 2, // 弹珠数量(2-10)
            score: 60,
            marbleSkin: '普通',
            achievements: ['新手'],
            isHost: false
          },
          {
            id: 'player6',
            name: '玩家F',
            avatar: '/static/avatar6.png',
            status: '准备中',
            marbles: 7, // 弹珠数量(2-10)
            score: 180,
            marbleSkin: '闪电',
            achievements: ['高手'],
            isHost: false
          },
          {
            id: 'player7',
            name: '玩家G',
            avatar: '/static/avatar7.png',
            status: '未准备',
            marbles: 3, // 弹珠数量(2-10)
            score: 75,
            marbleSkin: '普通',
            achievements: [],
            isHost: false
          },
          {
            id: 'player8',
            name: '玩家H',
            avatar: '/static/avatar8.png',
            status: '已准备',
            marbles: 5, // 弹珠数量(2-10)
            score: 110,
            marbleSkin: '彩虹',
            achievements: ['连胜3局'],
            isHost: false
          }
        ]
      });
    }, 500);
  }
};
